package com.dongao.marketing;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.dongao.marketing.common.persistence.Page;
import com.dongao.marketing.common.web.BaseController;
import com.dongao.marketing.modules.sys.entity.Dict;
import com.dongao.marketing.modules.sys.service.interfac.IDictService;
@Controller
@RequestMapping(value = "dict")
public class DictController extends BaseController {

	@Autowired
	private IDictService dictService;
	
	@RequestMapping(value = {"list", ""})
	@ResponseBody
	public Object list(Dict dict, HttpServletRequest request, HttpServletResponse response, Model model) {
		 Page<Dict> page = dictService.findPage(new Page<Dict>(request, response), dict); 
		return page;
	}
}
